home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / tcprogud.sit / TC Prog Guide / card_34612.txt < prev    next >
Text File  |  1991-02-27  |  1KB  |  26 lines

  1. -- card: 34612 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 4755
  5. -- name: 
  6.  
  7.  
  8. -- part contents for background part 6
  9. ----- text -----
  10. 8.2  Math Functions
  11.  
  12. -- part contents for background part 7
  13. ----- text -----
  14. 193
  15.  
  16. -- part contents for background part 4
  17. ----- text -----
  18. TC's standard MATH FUNCTIONS are contained in the ANSI library.  The standard header file math.h contains declarations for these functions:
  19.  
  20.     # include   <math.h>
  21.  
  22. C does not provide an exponentiation operator; instead the standard pow() function is used.  This function returns x raised to the power y.  If x is negative then y must be integral.  Its prototype is:
  23.  
  24.     double  pow(double  x, double  y);
  25.  
  26. The sqrt() function returns the (double precision) square root of its argument.  Most of the common trigonometric functions are also available, returning doubles:  sin(), cos(), tan(), asin(), acos(), atan, exp(), log(), log10(), cosh(), sinh(), tanh().  The abs() function computes the absolute value of an integer while fabs() works for doubles.